//
//  personInforCell.m
//  doubleEduStudents
//
//  Created by 盛洋 on 2021/1/11.
//  Copyright © 2021 shengYang. All rights reserved.
//

#import "personInforCell.h"

@implementation personInforCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.content_field layoutMyTextField];
    APPViewBorderRadius(self.changetel_btn, 10, 1, [UIColor whiteColor]);
    self.content_field.font = self.name_lab.font =  self.changetel_btn.titleLabel.font = self.man_btn.titleLabel.font = self.woman_btn.titleLabel.font = self.tip_lab.font = AutoLabFont2;
    APPViewBorderRadius(self.content_field, 10, 1, Base_lineColor);
    [self.man_btn setHidden:YES];
    [self.woman_btn setHidden:YES];
    [self.changetel_btn setHidden:YES];
    
    [self.man_btn addTarget:self action:@selector(chooseMan:) forControlEvents:UIControlEventTouchUpInside];
    [self.woman_btn addTarget:self action:@selector(chooseWoman:) forControlEvents:UIControlEventTouchUpInside];
}

-(void)chooseMan:(UIButton *)sender{
    if ([self.delegate respondsToSelector:@selector(chooseMan:)]) {
        [self.delegate chooseMan:sender];
        [sender setImage:[UIImage imageNamed:@"dot_icon_s"] forState:UIControlStateNormal];
        [self.woman_btn setImage:[UIImage imageNamed:@"dot_icon_n"] forState:UIControlStateNormal];
    }
}

-(void)chooseWoman:(UIButton *)sender{
    if ([self.delegate respondsToSelector:@selector(chooseWoman:)]) {
        [self.delegate chooseWoman:sender];
        [sender setImage:[UIImage imageNamed:@"dot_icon_s"] forState:UIControlStateNormal];
        [self.man_btn setImage:[UIImage imageNamed:@"dot_icon_n"] forState:UIControlStateNormal];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
